package com.edais.service.gift;

import java.util.Map;

import com.edais.domain.gift.GiftPackageOrder;
import com.alibaba.fastjson.JSONObject;

/**
 * 
 * 礼包订单service
 * 
 * @author rxc 2016-11-16 10:06:35
 *
 */
public interface GiftPackageOrderService {
	/**
	 * 查询k码激活礼包迪订单信息ByCardeNo（斐讯接口）
	 * 
	 * @param cardNo
	 * @param logInfo
	 * @author rxc
	 * @return
	 * @throws Exception
	 */
	Map<String, Object> queryGiftPackageOrderByCardNo(String cardNo, String logInfo) throws Exception;

	/**
	 * 根据cardNo 解冻或冻结礼包订单（斐讯接口）
	 * 
	 * @param cardNo
	 * @param logInfo
	 * @param type
	 *            1 解冻 2冻结
	 * @author rxc
	 * @return
	 * @throws Exception
	 */
	Map<String, Object> giftPackageFrozen(String cardNo, String logInfo, int type) throws Exception;

	/**
	 * 获取礼包订单主账户的信息
	 * 
	 * @param userId
	 * @param phone
	 * @return
	 * @throws Exception
	 */
	JSONObject giftPackageJoinMyAccount(String userId, String phone) throws Exception;

	GiftPackageOrder loadGiftPackageOrder(Long id);

	/**
	 * 根据cardNo判断送的是理财还是礼包 true 走理财 false 走礼包
	 * 
	 * @param cardNo
	 * @return
	 * @throws Exception
	 */
	boolean isGiftPackagetOrLiCai(String cardNo, String logInfo) throws Exception;

	GiftPackageOrder selectGiftPackageOrder(Map<String, Object> params);

	/**
	 * 取消K码礼包
	 * @param logInfo
	 * @param params
	 * @return
	 * @throws Exception
	 */
	Map<String, Object> cancelKcodeGiftPackage(String logInfo, Map<String, Object> params) throws Exception;
}
